import React from 'react'
import { useCounterStore } from '@/store'

export default function Counter() {
  const { value, increment, decrement } = useCounterStore()
  return (
    <div>
      <button onClick={decrement}>-</button>
      <span style={{ margin: '0 8px' }}>{value}</span>
      <button onClick={increment}>+</button>
    </div>
  )
}
